//用户气球
let mongoose = require('mongoose');
let Common=require('../../util/common');
let awards=['恭喜“小乖乖”获得复活针3枚','恭喜“玉敏”获得金币100个','恭喜“简爱”获得复活针2枚','恭喜“一路顺风”获得复活针3枚'];
module.exports={
    open:async function(options){
        let result=Common.weightRandom([{type:2,count:50,weight:40},{type:2,count:100,weight:10},{type:101,count:2,weight:40},{type:101,count:3,weight:10}]);
        options.self.getGoods([result]);
        awards.shift();
        if(result.type===2){
            awards.push(`恭喜“${options.self.nickname}”获得金币${result.count}个`);
        }else{
            awards.push(`恭喜“${options.self.nickname}”获得复活针${result.count}枚`);
        }
        return result;
    },
    getAwards:async function(options){
        return awards;
    }
};